package com.xbongbong.pro.menu.pojo.dto;

import com.xbongbong.paas.domain.entity.PaasAppEntity;
import com.xbongbong.paas.domain.entity.PaasFormEntity;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.paas.toolbox.wrap.QueryIgnore;
import com.xbongbong.pro.enums.SaasMarkEnum;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotEmpty;
import java.util.Map;

/**
 * 菜单初始化
 * @author 吴峰
 * @version v1.0
 * @date 2019/1/15 20:02
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class MenuInitDTO extends BaseDTO {
    private static final long serialVersionUID = 8400717369079336521L;

    @Getter(onMethod_ = {@QueryIgnore})
    private Long appId;
    /**
     * saas应用标示，如crm
     */
    @NotEmpty(message = "saas应用标示不能为空")
    private String alias;


    private String name;

    private String icon;

    private String color;

    private Integer saasMark;

    private Map<String, PaasAppEntity> appMap;

    private Integer companyInit;

    private PaasFormEntity productForm;

    private String xbbCode;

    public MenuInitDTO(){
        color = "";
        companyInit = 0;
        saasMark = SaasMarkEnum.SAAS.getCode();
    }
}
